<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>slot-插槽的基本使用</title>
</head>
<script src="../js/vue.js"></script>
<body>

<h1>组件的插槽是为了让我们封装的组件更加具有扩展性</h1>

<div id="app">
    <qxf><button>按钮</button></qxf>
    <qxf><spa>span标签</spa></qxf>
    <qxf></qxf>
</div>

<template id="qxf">
    <div>
        <h2>我是组件</h2>
        <p>我是组件</p>
        <slot><button>默认按钮</button></slot>
    </div>
</template>

</body>

<script>
    const vue = new Vue({
        'el': '#app',
        'data': {},
        'methods': {},
        components: {
            qxf: {
                template: '#qxf',
            }

        }
    })
</script>
</html>